﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace MusicPlayerLib.DataModel
{
    /// <summary>
    /// 该类用来表示媒体库的内容，在第一次启动时创建，并且
    /// 由用户指定的文件夹中寻找支持的音频文件并且根据找到的文件
    /// 建立Album、Artist、AudioFile的集合，并且将得到的结果序列化
    /// 以后在每次启动程序时，从序列化的文件中反序列化，得到媒体库信息
    /// </summary>
    [Serializable]
    public class MediaLibrary
    {

        private DateTime updateTime;
        private List<AudioFile> tracks;
        private List<Album> albums;
        private List<Artist> artists;
        

        public MediaLibrary()
        {
            tracks = new List<AudioFile>();
            albums = new List<Album>();
            artists = new List<Artist>();

            updateTime = new DateTime();
        }

        public List<Album> Albums
        {
            get
            {
                return albums;
            }
            set
            {
                albums = value;
            }
        }

        public List<Artist> Artists
        {
            get
            {
                return artists;
            }
            set
            {
                artists = value;
            }
        }

        public DateTime UpdateTime
        {
            get { return updateTime; }
            set { updateTime = value; }
        }
        

        public List<AudioFile> Tracks
        {
            get { return tracks; }
            set { tracks = value; }
        }
      
    }
}
